
# 输入整数n打印对应的三角形
# 请输入: 3
# 1.
# *
# **
# ***
def triangle1(n):
    for line in range(1, n+1):  # line代表第几行
        print('*' * line)

# 2.
#   *
#  **
# ***
def triangle2(n):
    for line in range(1, n+1):
        star_count = line
        blank_count = n - star_count
        aline = ' ' * blank_count + '*' * star_count
        print(aline)

# 3.
# ***
# **
# *
def triangle3(n):
    for star_count in range(n, 0, -1):
        print('*' * star_count)

# 4.
# ***
#  **
#   *
def triangle4(n):
    for star_count in range(n, 0, -1):
        blank_count = n - star_count
        aline = ' ' *  blank_count + '*' * star_count
        print(aline)

def main():
    n = int(input('请输入:'))
    triangle1(n)
    print('---------')
    triangle2(n)
    print('---------')
    triangle3(n)
    print('---------')
    triangle4(n)

main()